/* $RCSFile: AddItemPage.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/ADNCRM.Core/UI/AddItemPage.cs $
 * $log$
 * Revision 6 2010/08/06 19:56:29  christian.surieux
 *   Added Log to All cs files
 */

using System;
using System.IO;
using System.Configuration;
using System.Collections;
using System.Reflection;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using AddonNice.UI;
using AddonNice.UI.WebControls;
using AddonNice.Helpers;
using AddonNice.Security;
using AddonNice.Configuration;


namespace AddonNice.UI
{
	/// <summary>
	/// AddItemPage inherits from AddonNice.UI.EditItemPage 
	/// </summary>
	public class AddItemPage : EditItemPage 
	{
		/// <summary>
		/// Handles OnUpdate event
		/// </summary>
		protected override void OnUpdate(ADNPageEventArgs e) 
		{
			// Verify that the current user has access to add in this module
			if ( !string.IsNullOrEmpty(EntityName) && !PortalSecurity.HasAddPermissions(EntityName) )
				PortalSecurity.AccessDeniedEdit();
			base.OnUpdate(e);
		}

		/// <summary>
		/// Load settings
		/// </summary>
		protected override void LoadSettings()
		{
			// Verify that the current user has access to edit this module
			if ( !string.IsNullOrEmpty(EntityName) && !PortalSecurity.HasAddPermissions(EntityName) )
				PortalSecurity.AccessDeniedEdit();
			base.LoadSettings();
		}
	}
}